from langchain_community.utilities import SerpAPIWrapper
from langchain_openai import ChatOpenAI
from dotenv import load_dotenv, find_dotenv
from langchain_openai import OpenAIEmbeddings

# 加载 .env 到环境变量
_ = load_dotenv(find_dotenv())


# 默认是gpt-3.5-turbo
def get_llm(model: str = "gpt-3.5-turbo", temperature: int = 0) -> ChatOpenAI:
    return ChatOpenAI(model=model, temperature=temperature)


def get_embeddings():
    return OpenAIEmbeddings()
